from django.conf.urls import url
from equipments import views

urlpatterns = [
    # url(r'^books/$',views.BookAPIView.as_view()),
    # get请求:查看所有设备;post请求:增加新的设备
    url(r'^equipments$', views.EquipmentAPiView.as_view()),
    # get请求:查看单个设备;put请求:修改单个设备;delete请求：删除单个设备
    url(r'^equipments/(?P<eid>.+)$', views.EquipmentDetailView.as_view()),
    # 获取空闲设备
    url(r'^equipments/status0$', views.EquipmentModelViewSets.as_view({"get": "status_0"})),
    # 获取使用中设备
    url(r'^equipments/status1$', views.EquipmentModelViewSets.as_view({"get": "status_1"})),
    # 获取损坏、不可用设备
    url(r'^equipments/status2$', views.EquipmentModelViewSets.as_view({"get": "status_2"})),
    # 获取所有设备，并且包含使用中设备的订单信息
    url(r'^equipmentdetail$', views.NewEquipmentDetailView.as_view()),
    # 获取所有cluster下的所有设备，并且包含使用中设备的订单信息
    url(r'^equipmentcluster$', views.EquipmentClusterView.as_view()),
    # 获取某个cluster下的所有设备，并且包含使用中设备的订单信息
    url(r'^equipmentclusterdetail$', views.EquipmentClusterDetailView.as_view()),
    # 获取不同状态设备的数量
    url(r'^equipmentcounts$', views.EquipmentStatusView.as_view()),
]
